home *** CD-ROM | disk | FTP | other *** search
/ Pascal Super Library / Pascal Super Library (CW International)(1997).bin / BBS_UTL / DDPLUS71 / RIPLINK.ZIP / RIPDOOR.PAS < prev    next >
Pascal/Delphi Source File  |  1995-03-23  |  4KB  |  112 lines

  1. Program RIPDoor;
  2.  
  3. {$F+}
  4.  
  5. { RipDoor (RipDoor) - Copyright (C) 1995 by InterProgramming      }
  6. {                     All rights reserved.                        }
  7. { Version 1.21      - For distribution with RipLink.              }
  8. {                     FREE to all registered RipLink users.       }
  9.  
  10. { This is a sample program to show the use of RIPlink.  RIPlink is a }
  11. { standalone product and requires the use of the DDPlus kit.         }
  12.  
  13. { This sample works with the DDPlus Kit. }
  14.  
  15. { This example displays a simple screen to the user composed of various      }
  16. { things that RIPscrip supports.  Then it will wait for a character and then }
  17. { display the RIP file, CITY.RIP.  We've provided CITY.RIP as a convenience  }
  18. { to you.                                                                    }
  19.  
  20.  
  21. uses
  22.   Dos, Crt, DDPlusR, Elog, RIPlink;
  23.  
  24. Var
  25.   ch       : char;
  26.  
  27. Procedure Header;
  28. const
  29.   test : fpt = (146,73,36,146,73,36,146,73);
  30.   t2   : fpt = (127,159,231,227,235,141,189,254);
  31. var
  32.   bla  : boolean;
  33. begin
  34.   if Graphics=5 then
  35.    begin
  36.     RIP^.RipResetWindows;
  37.       {good idea at beginning of every scene}
  38.     RIP^.RipSetPalette(0,1,2,3,4,5,7,20,56,57,58,59,60,61,62,63);
  39.       {define the color palette - this is the default setting}
  40.     RIP^.RipTextWindow(1,8,80,20,true,0);
  41.       {define a text window}
  42.     RIP^.RipButtonStyle(0,0,2,768,3,15,0,15,8,7,0,0,15,7);
  43.       {define a button style}
  44.     RIP^.RipWriteMode(0);
  45.       {set the write mode}
  46.     RIP^.RipColor(12);
  47.       {set the drawing color}
  48.     RIP^.RipLineStyle(0,0,3);
  49.       {set the line style}
  50.     RIP^.RipFontStyle(3,0,2);
  51.       {set the font type and style (Font 2)}
  52.     RIP^.RipTextXY(10,4,'DDplus/7 - World''s Most Popular Doorkit');
  53.     RIP^.RipColor(14);
  54.     RIP^.RipTextXY(14,9,'DDplus/7 - World''s Most Popular Doorkit');
  55.     RIP^.RipColor(11);
  56.     RIP^.RipTextXY(18,14,'DDplus/7 - World''s Most Popular Doorkit');
  57.     RIP^.RipColor(10);
  58.     RIP^.RipTextXY(22,19,'DDplus/7 - World''s Most Popular Doorkit');
  59.     RIP^.RipColor(13);
  60.     RIP^.RipTextXY(26,25,'DDplus/7 - World''s Most Popular Doorkit');
  61.     RIP^.RipColor(12);
  62.     RIP^.RipLoadIcon(10,100,0,true,'computer.icn');
  63.     RIP^.RipPutImage(70,100,0);
  64.       {copy image from clipboard - happens to be icon because of last command}
  65.     RIP^.RipFillPattern(test,9);
  66.       {define a fill pattern - see const above}
  67.     RIP^.RipBar(250,100,450,150);
  68.     RIP^.RipFillPattern(test,1);
  69.       {define a fill pattern - see const above}
  70.     RIP^.RipColor(9);
  71.     RIP^.RipBar(450,200,639,320);
  72.     RIP^.RipFillPattern(t2,6);
  73.     RIP^.RipBar(250,175,450,250);
  74.     RIP^.RipButtonStyle(0,0,2,1038,0,15,0,15,8,9,0,0,0,13);
  75.     RIP^.RipPixel(0,4);
  76.     RIP^.RipButton(50,180,200,260,0,0,'','Button','B');
  77.     Sread_char(ch);
  78.     RIP^.RipResetWindows; {reset everything again}
  79.     bla := RIP^.DisplayRIPfile('city.rip'); {display the RIP file CITY.RIP}
  80.     RIP^.RipButtonStyle(0,0,2,1038,0,15,0,15,8,9,0,0,0,13);
  81.     RIP^.RipPixel(0,4);
  82.     RIP^.RipButton(50,180,200,260,0,0,'','Button','B');
  83.   end;
  84.   if Graphics=3 then
  85.    begin
  86.     Sclrscr;
  87.     Speedread(ch);
  88.     Swriteln(' ');
  89.     Set_Color(12,0);
  90.     SwriteXY(1,1,'Press any Key >');
  91.     Sread_char(ch); {Wait for a character}
  92.     SwriteXY(1,2,'Ansi Display in DDplusR 7.0');
  93.     Set_Color(14,5);
  94.     Swrite('  Test 1  ');
  95.     Set_Color(11,0);
  96.     SwriteXY(11,11,'Press any Key >');
  97.     Sread_char(ch); {Wait for a character}
  98.     Set_Color(2,0);
  99.     SwriteXY(12,12,'Ansi Display in DDplusR 7.0');
  100.     Set_Color(5,0);
  101.     SwriteXY(22,23,'Press any Key >');
  102.    end;
  103. end;
  104.  
  105. Begin               {main block}
  106.   SaveExitProc:=Exitproc;
  107.   ExitProc:=@MyExit1;
  108.   INITDOORDRIVER('RIP.CTL');
  109.   Header;
  110.   Sread_char(ch); {Wait for a character}
  111. End.
  112.